package com.symbio.ishenapi.patient.controller;

import com.symbio.ishenapi.common.controller.BaseController;
import com.symbio.ishenapi.patient.model.TmPatientHolonephrosmanage;
import io.jboot.web.controller.annotation.RequestMapping;

import java.util.List;

@RequestMapping("/TmPatientHolonephrosmanage")
public class HolonephrosmanageController extends BaseController {

    public void saveTmPatientHolonephrosmanage(){       //全肾管理方案数据提交
        TmPatientHolonephrosmanage user = (TmPatientHolonephrosmanage)getReqBodyObject(TmPatientHolonephrosmanage.class);
        if (user.save())
            renderJsonRet(40001);
        else
            renderJsonError(40002);
    }

    public void findByUserId(){
        TmPatientHolonephrosmanage user = (TmPatientHolonephrosmanage)getReqBodyObject(TmPatientHolonephrosmanage.class);
        TmPatientHolonephrosmanage use = new TmPatientHolonephrosmanage();
        use.setUserId(user.getUserId());
        List<TmPatientHolonephrosmanage> list = TmPatientHolonephrosmanage.dao.findByUserId(use);
        renderJsonRet(list);
    }

}
